<template lang="pug">
    kalix-dialog.user-add(title='编辑' bizKey="enrolmentScoreStander" ref="kalixBizDialog"
        v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
        div.el-form(slot="dialogFormSlot")
            input(v-model="formModel.quesId" type="hidden")
            <!--input(v-model="formModel.quesType" type="hidden")-->
            input(v-model="formModel.subType" type="hidden")
            el-form-item(label="标准项" prop="standerItem" v-bind:label-width="labelWidth" v-bind:rules="rules.standerItem")
                el-input(v-model="formModel.standerItem")
            el-form-item(label="每项打分" prop="itemScore" v-bind:label-width="labelWidth")
                el-input-number(v-model="formModel.itemScore" v-bind:min="1" v-bind:max="100")
            el-form-item(label="命题教师" prop="propositionTeacher" v-bind:label-width="labelWidth")
                el-input(v-model="formModel.propositionTeacher" )
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    export default {
        name: 'ScoreStanderEdit',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                labelWidth: '180px',
                rules: {
                    standerItem: [{required: true, message: '请输入试题标准项', trigger: 'blur'}]
                },
                targetURL: null
            }
        },
        methods: {
            init(dialogOption) {
                this.targetURL = "/camel/rest/subjects/" + dialogOption.quesId + "/scorestanders"
            }
        }
    }
</script>

<style scoped>

</style>